1. Field of the Invention
The invention relates generally to data and image compression. More specifically, the invention relates to thresholding for quantization performed during image compression, particularly where discrete wavelet transform techniques are utilized.
2. Description of the Related Art
Image compression plays a key role in multimedia applications such as videoconferencing, digital imaging and video streaming over a network. In the art of image compression, the goal is to reduce the bit rate of storage and/or transmission while still maintaining an image quality that is acceptable for the intended application.
Image compression techniques can be classified as either "lossy" or "lossless". With lossless compression, the original image prior to compression can be exactly recovered when the compressed image is decompressed. Consequently, lossless techniques, whose compression ratios depend upon the entropy of an image, do not ordinarily achieve high compression ratios and, since they preserve a high percentage of original image information, may also be computationally expensive. By contrast, lossy compression schemes provide only an approximation of the original image. Thus, with lossy compression, greater compression ratios can be achieved but often with loss in image quality compared to lossless techniques. One such lossy technique is a transform-based coding known as JPEG (Joint Photographic Experts Group) which transforms pixels of an input image using the well-known Discrete Cosine Transform (DCT). Another transform-based technique, in vogue more recently is the DWT (Discrete Wavelet Transform) which unlike JPEG does not operate on a fixed block size basis. Whether JPEG or DWT, the resulting transformed pixel values are "quantized" or mapped to smaller set of values in order to achieve compression. The quality of a compressed image that is decompressed will depend greatly on how the quantization of the transformed pixels are performed. The compression ratio (the size of the original raw image compared to the compressed image) will also be affected by the quantization. After such compression, the compressed data set can be entropy encoded in a form suitable for transmission or storage.
When images are captured and/or compressed on imaging devices such as digital cameras, these devices are often provided with a storage mechanism such as a disk drive or card-based memory unit. Such storage mechanisms have a fixed and often smaller capacity in comparison to similar mechanisms in general purpose computing machines. For a device such as a digital camera, the relevant measure of storage capability from a user/consumer standpoint is not the total number of bytes capacity to store images, but rather, the total number of images that can be stored. This evolves from the nature of cameras in which a film is loaded and has a set number of exposures (say 24) or pictures that it can capture. Likewise, in marketing a digital camera, it may be desirable to guarantee the user that the camera can capture a fixed number of images before its storage mechanism needs to be emptied to capture yet more images. If the compression achieved by quantization and entropy encoding is variable, then the compressed and stored image size will also be variable.
If images are to be compressed on a digital camera or other imaging device using variable compression ratio techniques, then there is a need for a means of guaranteeing the number of images storable in a fixed size storage mechanism.